import { ADD_TODOLIST } from '../contant';
const initTodolist = ['我是list的初始值'];
const todolist = (state = initTodolist, action) => {
    const { type, data } = action;
    switch (type) {
        case ADD_TODOLIST:
            //往数组中追加一个元素
            return [...state, data];
        default:
            return state;
    }
}
export default todolist;